<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="../css/reset.css">
    <link rel="stylesheet" type="text/css" href="../css/result.css">
    <script type="text/javascript" src='../js/adaptive.js'></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.8.0/jquery-1.8.0.js"></script>
    <script src=""></script>
    <title>报名</title>
</head>
<body>
     <div class="resultPage">
      <img src="../images/success.png" alt="" class="level1">
      <img src="../images/success2.png" alt="" class="level2">
      <img src="../images/success3.png" alt="" class="level3">
      <div class="fixedImg">
           <div class="resultImg">
          <!--   <img src="../images/success.jpg" alt=""> -->
            <p class="rightNum">17</p>
            <p class="position">学习标兵 </p>
        </div>
        <div class="resultText">
              <p>尊敬的<span class="resultName">xxx</span>，您答对了 <span class="rightNum2">17</span> /20题，花费了<span class="minitus">3</span>分<span class="second">20</span>秒，顺利闯过第<span class="stage">一</span>关，获得<span class="honner"> 学习标兵</span>称号！</p>  
        </div>
        <p class="startBtn">
                <a class="continue">
                    继续闯关
                </a>
                <a class="shareFriend">
                    分享好友
            </a>
            </p>
            <p class="support">技术支持：武汉纺友技术有限公司</p>
      </div>
      <!-- 分享按钮 -->
      <div class="share">
          <p class="getIt"></p>
      </div>
    </div>
    <script>
        window.onload =function(){
          var screenHeight =document.body.clientHeight;
           var param = window.location.href.split('?')[1]
           var count,totalCount,id;
           param =param.split('&');
           count =param[0].split('=')[1]
           totalCount= param[1].split('=')[1]
           id= param[2].split('=')[1]
           console.log(count,totalCount,id);
           if(count>=10){
              $('.rightNum').addClass('active')
           }
           $('.rightNum').html(count)
           $('.rightNum2').html(count)
            totalMin =parseInt((totalCount)/60)
            totalSec =parseInt(totalCount  -totalMin*60)
           $('.minitus').html(totalMin)
           $('.second').html(totalSec)
           if(count>=10){
               $('.rightNum').css('transform','translateX(-0.8rem)')
           };
           if(id==20){
                    $('.stage').html('一')
                    $('.honner').html('学习标兵')
                    $('.position').html('学习标兵')
                    $('.level1').show()
                $('.continue').click(function(){
                     window.location ='question.html?id='+21;
                }); 
               
           }else if(id==40){
                    $('.stage').html('二')
                    $('.honner').html('学习明星')
                    $('.position').html('学习明星')
                    $('.level2').show()
                $('.continue').click(function(){
                    window.location ='question.html?id='+41
            })
           }else{
                $('.stage').html('三')
                $('.honner').html('学习王者')
                $('.position').html('学习王者')
                 $('.level3').show()
                $('.continue').css('display','none')
           }
           //增加分享按钮部分
            $('.shareFriend').click(function(){
                    $('.share').show()
                })
           $('.getIt').click(function(){
              $('.share').hide()
           })
           //取回cookie
		 function getCookie(c_name) {
            if (document.cookie.length>0){
            c_start=document.cookie.indexOf(c_name + "=")
            if (c_start!=-1)
                { 
                c_start=c_start + c_name.length+1 
                c_end=document.cookie.indexOf(";",c_start)
                if (c_end==-1) c_end=document.cookie.length
                return unescape(document.cookie.substring(c_start,c_end))
                } 
            }
            return ""
            }
            $('.resultName').html(getCookie('name'))
        }
    </script>
</body>
</html>